{% extends "header.html" %}
{% block content %}
<script>
function delUser(){
	if(confirm("删除"))
	{
 		$("#op").val("add");
		$("#adminform").submit();
	}
}
function addUser(){
	$("#op").val("add");
	$("#adminform").submit();
}
function check_submit(op){
	$("#op").val(op+"_submit");
	$("#editadmin").submit();
	return true;
}
function cancel(){
	$("#op").val("");
	$("#editadmin").submit();
	return true;
}
</script>
<br />

<form id="adminform" name="userdel" action="" method="post" class="form-horizontal">
<table class="table table-striped">
	<tr>
		<td align="left">
		<input type="button" value="删除管理员" onclick="delUser()"/>
		&nbsp;&nbsp;
		<input type="button" value="新增管理员" onclick="addUser()"/>
		</td>
	</tr>
	<tr>
		<td><hr/>
			<table  class="list" width="100%" border="0" cellspacing="0" cellpadding="5">
				<tr>
					<td width=50>&nbsp;</td>
					<td width=100>用户名</td>
					<td width=150>最后登录时间</td>
					<td width=150>角色</td>
					<td width=150>创建时间</td>
					<td align="center" width=150>操 作</td>
				</tr>
				{% for i in user_list %}
				<tr>
					<td><input type="checkbox" value="{{i.0}}" name="uid" /></td>
					<td><a href="admincp.php?adminuid={{i.1}}">{{i.1}}</a></td>>
					<td>{{i.2}}</td>
                    <td>{{i.3}}</td>
					<td>{{i.4}}</td>
					<td align="center">
					<a href="admincp.php?mod=admin&act=list&op=edit&adminuid={$admin['uid']}">编 辑</a>
					</td>
				</tr>
				{% endfor %}
			</table>
			<input type="hidden" name="op" id="op" value="edit">
		</td>
	</tr>
	</table>
</form>


{% endblock %}